import request from '@/server/index'

// 刷新token
export const refreshToken = () =>
  request.post({
    url: 'sso/keepSignature',
  })

// 登陆
interface LoginParams {
  loginName: string
  password: string
  platId: string
}
export const loginUser = (params: LoginParams) =>
  request.post({
    url: 'sso/login',
    data: params,
  })

// 查询用户
interface queryUserParams {
  curPage: number
  entId: string
  loginName: string
  pageSize: number
  password: string
  platId: string
  userId: string
}
export const queryUser = (params: queryUserParams) =>
  request.post({
    url: '/api/v1/user/list',
    data: params,
  })
